getResources
Type
function
Summary
Returns a list of the resources in a Mac OS file.
Syntax
getResources(<filePath> [, <resourceType>])
Description
Use the getResources function to find out whether a resource already exists before using it or copying it.
Parameters
Name | Type | Description |
---|---|---|
filePath | The location and name of the file whose resource fork you want to list. If you specify a name but not a location, LiveCode assumes the file is in the defaultFolder. | |
resourceType | The 4-character type of the resources you want to list. If you don't specify a resourceType, the getResources function lists all the resources of all resource types. |
Examples
getResources("Project Resources")
getResources(it,"STR#")
Value
Name | Type | Description |
---|---|---|
return | enum | The getResources function returns a list of resources, one per line. Each line consists of the following items items :
|
the result | If the filePath does not exist, the result is set to "can't find file". If the filePath exists, but the file has no resource fork, the result is set to "can't open resource fork". If the file has a resource fork but no resources, the result is empty. |
Related
control structure: function
function: result, setResource
glossary: resource fork, resource, Mac OS, return
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
Platforms
desktop